package com.whz.enumdemo;

/**
 * @Author: sinosoft
 * @Description: 打印一个物体在其它行星上面的重量
 * @Date: Create in 16:03 2021/5/13
 * @Modified By:
 */
public class WeightTable {
    public static void main(String[] args) {
        double earthWeight = 999d;
        for(Planet p : Planet.values()) {
            System.out.printf("在%s上的重量为:%f%n", p, p.surfaceWeight(earthWeight));
        }
    }
}
